<div class="panel panel-default" ng-controller="SaleShiftTplCtrl">
	<div class="panel-heading">
		促销活动 / 关联班次档案 （{{subject}}） <span
			style="float: right; margin-top: -7px; height: 0px">
			<button type="submit" class="btn m-b-xs w-xs btn-info"
				ui-sref="app.public.sales()">返回</button>
		</span>
	</div>
	<toaster-container
		toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.template__shiftNo" class="form-control" placeholder="班次号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="routeList.selected" theme="bootstrap">
							<ui-select-match placeholder="线路">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="route in routeList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" route.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="routeList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-1">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b b-light">
			<thead>
				<tr>
					<th style="width: 10px;"></th>
					<th style="width:70px;">班次号</th>
					<th style="width:80px;">状态</th>
					<th style="width:100px;">线路名</th>
					<th style="width:80px;">开班时间</th>
					<th style="width:80px;">收班时间</th>
					<th style="width:80px;">车票数</th>
					<th style="width: 50px;">
						<div class="list-icon">
							<a href tooltip="关联班次档案" >
								<i class="fa fa-plus" ng-click="add()"></i>
							</a>
						</div>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="sale in dataList">
					<td></td>
					<td>{{sale.template.shiftNo}}</td>
					<td>
					   <span ng-if="sale.template.status==1">正常</span>
					   <span ng-if="sale.template.status==2">暂停</span>
					   <span ng-if="sale.template.status==3">停用</span>
					</td>
					<td>{{sale.template.route.name}}</td>
					<td>{{sale.template.startTime| date : ' HH:mm:ss'}}</td>
					<td>{{sale.template.endTime| date : 'HH:mm:ss'}}</td>
					<td>{{sale.template.tickets}}张</td>
					<td>
					    <div class="list-icon">
							<a href tooltip="删除">
								<i class="fa fa-times" ng-click="del('sm',sale ,'delete')"></i>
							</a>												        
					    </div>
					</td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="11" style="text-align: center;">暂无班次档案折扣信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer />
</div>
